 {extend name="layout:base" /}{block name="content"}

 <?php
$global=isSupperManagerForSession();
 ?>
 <link rel="stylesheet" type="text/css" href="/static/My97DatePicker/skin/WdatePicker.css" />
     <script charset="utf-8" src="/static/My97DatePicker/WdatePicker.js"></script>
<style type="text/css">
  .yg_inp>input{margin-bottom: 10px;}
#zc_detail table{margin:10px;}
#zc_detail table tr td{
	border: 1px solid #ddd;
	height:40px;
	line-height:40px;
	padding-left:5px;
	padding-right:5px;
} 
.ordertable input {width:90%;}
.policeLable{padding:2px 4px;margin-left:4px;}
#taskDate .taskDateItem{
	width:100%;height:40px;line-height:40px;margin:4px 0px;
}
#taskDate .taskDateItem .taskDateItemLeft{width:10%;float:left;}
#taskDate .taskDateItem .taskDateItemRight1{width:70%;float:left;border:1px solid #139667;height: 42px;}
#taskDate .taskDateItem .taskDateItemRight2{width:20%;float:right;}
#taskDate .taskDateItem .opUsers img{width:22px;margin-left:5px;}

#taskDate .taskDateItem .itemUser{padding: 4px 6px;background:#139667;margin-left:4px;color:white;}
#taskDate .taskDateItem .clear{clear:both;width:0px;height:0px;overflow:hidden;}
#taskDate .taskDateItem .jia,#taskDate .taskDateItem .jian{font-size:30px;cursor:pointer;font-weight:800;margin-left:5px;}

</style>

<!--引入JS-->
<script type="text/javascript" src="/static/admin/js/ajaxfileupload.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/static/ueditor/lang/zh-cn/zh-cn.js"></script>


<section class="topBanners">
         <div class="icon"></div>
         <div class="topBannersNav">
             <span data-url="/admin/doctor/lists" onclick="ContentLoadGo('/admin/doctor/hospconfig')">配置</span>

         </div>
      </section>
 <section id="zc_detail">
    <div style="width:98%;text-align: left;font-size:14px;margin-left: auto;margin-right:auto">1、系统配置</div>
     <table class="ordertable" border="0" cellspacing="0" style="width:100%;" cellpadding="0">

<?php
foreach($list as $key=>$val)
         {
?>
         <tr>
             <td width="400"><div align="right"><?php echo $val['memo'] ?><font style="color:red;">*</font></div></td>
             <td class="tr_cons">
                 <input type="text" name="data[<?php echo $val['varname']; ?>]" id="<?php echo $val['varname']; ?>" value="<?php echo $val['varvalue']; ?>" placeholder="" class="textbox" style="padding:0px;width:120px;" />
                 <?php echo $val['unit'] ?>
             </td>

         </tr>

<?php
}
?>

     </table>
     <table class="ordertable" style="width:100%;" border="0" cellspacing="0" cellpadding="0">
       <td colspan="2" style="height:50px;text-align:center;">
			<input type="button" power="70000"  style="width:80px;margin-top:4px;margin-bottom:4px;padding:0px;" value="保存" class="link_btn edit"/>
       </td>
     </tr>
   </table>

     <div style="width:98%;text-align: left;font-size:14px;margin-left: auto;margin-right:auto">2、全局价格配置</div>
     <table class="ordertable" border="0" cellspacing="0" style="width:100%;" cellpadding="0">

         <?php
        foreach($levelList as $key=>$val)
         {
         ?>
         <tr>
             <td width="400"><div align="right"><?php echo $val['name'] ?><font style="color:red;">*</font></div></td>
             <td class="tr_cons">

                交互问诊： <input type="text" name="data1[<?php echo $val['id']; ?>__money]" value="<?php echo $val['money']; ?>" placeholder="" class="textbox" style="padding:0px;width:120px;" />元
             </td>
             <td class="tr_cons">
                快速问诊： <input type="text" name="data1[<?php echo $val['id']; ?>__fast_money]" value="<?php echo $val['fast_money']; ?>" placeholder="" class="textbox" style="padding:0px;width:120px;" />元
             </td>

         </tr>

         <?php
}
?>

     </table>
     <table class="ordertable" style="width:100%;" border="0" cellspacing="0" cellpadding="0">
         <td colspan="2" style="height:50px;text-align:center;">
             <input type="button" power="70000"  style="width:80px;margin-top:4px;margin-bottom:4px;padding:0px;" value="保存" class="link_btn edit1"/>
         </td>
         </tr>
     </table>


</section>


<script type="text/javascript">

function myResearch(){
    var url="/admin/doctor/hospconfig";
    ContentLoadGo(url);
}
$(function(){

    $(".edit").unbind().bind("click",function(){
        var that =this;
        var url="/admin/doctor/hospconfig";
        var generaData=$("[name^='data']");

        var param={
            data:{},
            sys_opt:'editconfigdata'//后台判断编辑操作
        };
        getFormData(generaData,param.data);
        AjaxRequest(url,param,function(data){
           if(data.err==0) {
               SuccessTiShi("操作成功");
               myResearch();
           } else
           {
               ErrTiShi(data.msg);
           }
        });

   });

    $(".edit1").unbind().bind("click",function(){
        var that =this;
        var url="/admin/doctor/hospconfig";
        var generaData=$("[name^='data1']");

        var param={
            data:{},
            sys_opt:'editleveldata'//后台判断编辑操作
        };
        getFormData(generaData,param.data);
        AjaxRequest(url,param,function(data){
            if(data.err==0) {
                SuccessTiShi("操作成功");
                myResearch();
            } else
            {
                ErrTiShi(data.msg);
            }
        });

    });
});
</script>
 {/block}